import { createApp } from 'vue'
import router from './router/index'
//引入element plus
import ElementPlus from 'element-plus';
import 'element-plus/dist/index.css'
//引入element Plus图标库
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
//引入Pinia 构造函数
import { createPinia } from 'pinia'
//引入Pinia持久化操作
import piniaPersist from 'pinia-plugin-persist'
// import './style.css'
import App from './App.vue'

//实例化Pinia
const pinia = createPinia()
// 使用持久化插件
pinia.use(piniaPersist)

// createApp(App).mount('#app')
const app = createApp(App);

app.use(router).use(ElementPlus).use(pinia).mount('#app')

//注册所有图标
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
  app.component(key, component)
}

